﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nTribeHR
{
    public class TribeHRConnection
    {
        public string SubDomain { get; set; }
        public string Username { get; set; }
        public string ApiKey { get; set; }

        public TribeHRConnection(string subDomain, string username, string apikey)
        {
            this.SubDomain = subDomain;
            this.Username = username;
            this.ApiKey = apikey;
        }

        private TribeHRConnection()
        {}

        public string ConnectUrlWithCredentials 
        { 
            get
            {
                return "https://" + Username + ":" + ApiKey + "@" + SubDomain + ".mytribehr.com";     
            }
        }

        public string ConnectUrl
        {
            get
            {
                return "https://" + SubDomain + ".mytribehr.com";
            }
        }
    }
}
